<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="aplus-terminal" content="1"/>
		<meta name="keywords" content="SHOPDZ" />
		<meta name="apple-mobile-web-app-title" content="SHOPDZ"/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
		<title>修改个人信息</title>
		<link rel="shortcut icon" href="favicon.ico">
		<link rel="stylesheet" href="css/reset.css" />
		<link rel="stylesheet" href="css/style.css" />
		<link rel="stylesheet" href="css/common.css" />
		<script src="js/jquery-1.9.1.min.js"></script>
		<!-- <script type="text/javascript" src="js/config.js"></script> -->
		<script type="text/javascript" src="js/common.js"></script>
		<script type='text/javascript' src='js/upload/LocalResizeIMG.js'></script>
		<script type='text/javascript' src='js/upload/mobileBUGFix.mini.js'></script>
		<style>
			.upload{
				opacity: 0;
				position: absolute;
				height: 20%;
				margin-top: -0.3rem;
			}
			/*.img{ width:100;heigh:100}*/
		</style>
	</head>
	<body>
		<div id="header_has_nav"></div>
		<div class="wrapper" style="background: #f5f5f5;">
			<div class="spec-none" style="top:0; max-height:80%;width:100%;background:rgb(245, 245, 245);">
			<script src="js/crop/jquery.Jcrop.js"></script>
			<link rel="stylesheet" href="js/crop/demos.css" type="text/css" />
			<link rel="stylesheet" href="js/crop/jquery.Jcrop.css" type="text/css" />
			<style type="text/css">
			  #target {
			    background-color: #ccc;
			    width: 500px;
			    height: 330px;
			    font-size: 24px;
			    display: block;
			  }
			  .btn4{
			  	background: #AB2B2B;
			  	padding: .8rem 1.5rem;
			  	font-size: 1.4rem;
			  	color: #fff;
			  	border-radius: 3px;
			  	-webkit-border-radius: 3px;
			  	-moz-border-radius: 3px;
			  	-o-border-radius: 3px;
			  	border: none;
			  	margin: 0 1rem;
			  	cursor: pointer;
			  }
			</style>

			<div class="container">
			<div class="row">
			<div class="span12">
			<div class="jc-demo-box">
				<img src="" id="cropbox" class="returnimg" style="display:none;">
			</div>
			</div>
			</div>
			</div>

			<input type="hidden" id="x1" name="x" />
			<input type="hidden" id="y1" name="y" />
			<input type="hidden" id="w1" name="w" />
			<input type="hidden" id="h1" name="h" />
			<input type="hidden" id="abssrc" name="abssrc" />
			<div style="text-align: center;">
				<button class="btn4" onclick="checkCoords();">保存</button>
				<button class="btn4" onclick='window.location.href= "changemember.html?upload=0";'>取消</button>
			</div>
			
			</div>
		</div>
		
		<script type="text/javascript">
		redirectindex();
		function checkCoords(){
			if (parseInt($('#w1').val())){
				var x = $('#x1').val();
				var y = $('#y1').val();
				var w = $('#w1').val();
				var h = $('#h1').val();
				var height = $('.returnimg').height();
				var width = $('.returnimg').width();
				var abssrc = $('#abssrc').val();
				$('.head-img').attr('src','../static/img/loading.gif');
				$('.spec-none').hide();
				$.ajax({
					type: 'POST',
					url: ApiUrl + '/Presales/refundimg_second',
					data: {key:key,x:x,y:y,w:w,h:h,width:width,height:height,abssrc:abssrc},
					dataType: 'json',
					success: function(result) {
			            if(result.code == 0){
						    window.location.href = WapSiteUrl + "/changemember.html?upload=1";
			            }else{
			            	shopdz_alert('上传失败！');
			            }
			        }
				});
			}
		}
			$(function(){
				initPage();
			})
		</script>
		<script type="text/javascript" src="js/tmpl/head_second.js"></script>
	</body>
	
</html>
